package Thread;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;

public class SleepDemo {
    public static void main(String[] args) throws IOException {
        System.out.println("程序开始了");
        Scanner sc = new Scanner(System.in);
        int time = sc.nextInt();

        /*
        Scanner 实际上也可以这样操作
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        String line=br.readLine();
        int num=Integer.parseInt(line);
        */
        for (; time > 0; time--) {
            System.out.println(time + "s");
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }

        }
        System.out.println("时间到");
        System.out.println("程序结束了");
    }
}
